package cn.kent.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {


    @GetMapping("/hello")
    public String test01() {
        log.info("进入了test01方法，path = /test/hello");
        return "/test/hello";
    }

    @PostMapping("/hello")
    public String test02(@RequestBody String id) {
        log.info("进入了test02方法-post请求，path = /test/hello");
        log.info("request Body = " + id);
        return "/test/hello-post";
    }
}
